@import (less) "bpmn-js/dist/assets/bpmn-js.css";

@bpmn-nav-radius: 3px;

// todo(marstamm): remove when bpmn-js supports viewer without diagram-js.css
.djs-element-hidden {
  display: none;
}

.djs-container {
  --color-blue-205-100-50: hsl(205, 100%, 50%);
  --color-white: hsl(0, 0%, 100%);
  --color-black: hsl(0, 0%, 0%);
}

[cam-widget-bpmn-viewer] {
  border: 1px solid @gray-lighter;
  position: relative;
  min-height: 150px;

  .placeholder-container {
    display: table;
    width: 100%;
    height: 100%;
    position: absolute;
  }

  .placeholder-content {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
  }

  .loading-text {
    font-size: 20px;
  }

  .bjs-powered-by {
    display: none;
  }

  .diagram-holder .djs-container {
    overflow: hidden;
  }

  .diagram-holder {
    position: absolute;
    width: 100%;
    height: 100%;
  }

  .diagram-holder .highlight .djs-outline {
    rx: 14px;
    ry: 14px;
    stroke-width: 2px !important;
    stroke: @bpmn-highlight-border-color !important;
    fill: fade(@bpmn-highlight-bg, 40%) !important;
  }

  .diagram-holder .highlight:not(.djs-connection) .djs-visual > :nth-child(1) {
    rx: 14px;
    ry: 14px;
    fill: @bpmn-highlight-bg !important;
  }

  .grab-cursor {
    cursor: move;
    cursor: -webkit-grab;
    cursor: grab;
  }

  .navigation {
    position: absolute;
    right: (@grid-gutter-width / 2);
    width: @grid-gutter-width;
    min-height: @grid-gutter-width;

    button {
      font-size: 20px;
      text-align: center;
      position: absolute;
      width: @grid-gutter-width;
      height: @grid-gutter-width;
      color: @gray;
      padding: 0;
      bottom: 0;

      > span {
        text-align: center;
      }
    }

    &.reset {
      bottom: @grid-gutter-width * 3;

      span {
        top: 3px;
      }
    }

    &.zoom {
      bottom: (@grid-gutter-width / 2);
      height: (@grid-gutter-width * 2);

      button.in {
        bottom: (@grid-gutter-width * 1);
        border-bottom: 0;

        > span {
          top: 2px;
          left: 1px;
        }
      }

      button.out {
        bottom: 0;

        > span {
          top: 3px;
        }
      }
    }
  }

  .actions {
    float: right;
    position: relative;
    right: 15px;
    top: 15px;
    z-index: 999;

    div {
      padding: 1px;
    }
  }

  .bjs-breadcrumbs {
    font-size: 14px;
    left: 25px;
    top: 15px;
    padding-left: 0;

    li {
      a {
        color: @link-color;
      }

      &::before {
        height: 14px;
      }

      &:last-of-type a {
        color: inherit;
      }
    }
  }

  .bjs-drilldown {
    margin-top: 5px;
  }
}

.djs-cursor-move {
  cursor: move;
  cursor: -webkit-grabbing;
  cursor: grabbing;
}
